package cn.wolfcode.wolf2w.respository;

import cn.wolfcode.wolf2w.domain.Strategy;
import cn.wolfcode.wolf2w.domain.UserInfo;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 攻略持久化操作接口
 */
@Repository
public interface StrategyRepository extends MongoRepository<Strategy, String> {


    /**
     * 根据分类id查询攻略
     * @param catalogId
     * @return
     */
    List<Strategy> findByCatalogId(String catalogId);

    /**
     * 点击量前三的攻略
     * @param destId
     * @param pageable
     */
    List<Strategy> findByDestId(String destId, Pageable pageable);

    List<Strategy> queryByDestId(String id);
}
